const routes = [
    {
        path: '/',
        name: 'Home',
        component: () => import('@/components/HelloWorld.vue'),
        meta: {
            title: '首页'
        },
    },
    {
        path: '/hellofirst',
        name: 'HelloFirst',
        // component: () => import('@/components/HelloFirst.vue'), // 父路由组件中没有组件的情况下可以直接把子路由渲染到顶层
        meta: {
            title: '第一个页面'
        },
        children: [
            {
                path: '/hellofirst/hello',
                name: 'hellofirstHello',
                component: () => import('@/components/HelloWorld.vue'),
                meta: {
                    title: 'hellofirst下的hello页面'
                }
            },
            {
                path: 'hellofirsthello',
                // path: '/hellofirst/hellofirsthello', // 在没有组件的情况下两种方式的路由配置都可以
                name: 'hellofirstHello2',
                // component: () => import('@/components/HelloWorld.vue'),  // 同样如果二级菜单父组件没有组件，也可以把三级菜单渲染到顶层
                meta: {
                    title: 'hellofirsthello下的hello页面'
                },
                children: [
                    {
                        path: 'hellofirst',
                        // path: '/hellofirst/hellofirsthello/hellofirst', // 父路由没有组件的情况下两种方式都可以具体看项目进行选择
                        name: 'hellofirstHello3',
                        component: () => import('@/components/HelloFirst.vue'),
                        meta: {
                            title: 'hellofirsthello下的hello页面'
                        }
                    }
                ]
            }
        ]
    },
    {
        path: '/hello',
        name: 'Hello',
        component: () => import('@/components/HelloWorld.vue'),
        meta: {
            title: '第一hello个页面'
        }
    },
    {
        path: '/login',
        name: 'Login',
        component: () => import('@/view/login/Login.vue'),
        meta: {
            title: '登录'
        }
    },
    {
        path: '/error',
        name: 'error',
        component: () => import('@/view/error/Error.vue'),
        meta: {
            title: 'error页面'
        }
    },
]

export default routes